import Axios from 'axios'

export function login(data) {
    var formData = new FormData();
    formData.append("staffNumber", data.username);
    formData.append("password", data.password);

    return Axios.post('/wosApi/wos/v1/login/login', formData, { timeout: 2 * 60 * 1000 })
}

export function getInfo(token) {
    var formData = new FormData();
    formData.append("token", token);

    return Axios.post('/wosApi/wos/v1/login/getTokenInfo', formData)
}

export function logout(token) {
    var formData = new FormData();
    formData.append("token", token);

    return Axios.post('/wosApi/wos/v1/login/logout', formData)
}